package com.example.task1.util;

import okhttp3.RequestBody;
import okhttp3.Response;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Url;

public interface ApiService {

    @GET
    Call<ResponseBody> get(@Url String url);

    @GET
    Call<ResponseBody> get(@Header ("Authorization") String token,@Url String url);

    @POST
    Call<ResponseBody> post(@Url String url, @Body RequestBody body);

    @POST
    Call<ResponseBody> post(@Header ("Authorization")String token, @Url String url, @Body RequestBody body);

    @PUT
    Call<ResponseBody> put(@Url String url, @Body RequestBody body);

    @PUT
    Call<ResponseBody> put(@Header ("Authorization")String token, @Url String url, @Body RequestBody body);

    @DELETE
    Call<ResponseBody> del(@Url String url, @Body RequestBody body);

    @DELETE
    Call<ResponseBody> del(@Header ("Authorization")String token, @Url String url, @Body RequestBody body);

}
